import { _decorator, Asset, Component, error, find, instantiate, log, Node, Prefab, resources } from 'cc';
import { PrefabPath } from './Configs';
const { ccclass, property } = _decorator;

@ccclass('GameLauch')
export class GameLauch extends Component {
    start() {

        //加载资源
        resources.load(PrefabPath.UIRoot, Prefab, (err, ret) => {
            if (err) {
                error("加载UIRoot资源出错!");
                return;
            }
            //实例UIRoot预制体，父节点是Canvas
            let uiRoot = instantiate(ret);
            uiRoot.parent = find("Canvas");
        })
    }

    update(deltaTime: number) {

    }
}


